home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / shift.z / shift
Encoding:
Text File  |  2002-10-03  |  3.1 KB  |  80 lines

  1. SHIFT(3I)                                             Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      SSHHIIFFTT - Performs a left circular shift
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSHHIIFFTT (([II==]_i,,[JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran extension
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      SSHHIIFFTT performs a left circular shift of _i by _j bits.  It accepts the
  20.      following arguments:
  21.  
  22.      _i         The value to be shifted.  _i can be of type Boolean, integer,
  23.                real, or Cray pointer.
  24.  
  25.      _j         The number of bits to shift the value.  Must be of type
  26.                integer or Boolean.  _j must be within the range
  27.                0 <= _j <=_s_i_z_e, where _s_i_z_e is the size, in bits, of _i.  That
  28.                is, if _i is a 64-bit object, _j must be within the range
  29.                0 <= _j <= 64.
  30.  
  31.      For values of _j outside these ranges, SSHHIIFFTT returns an undefined
  32.      result.
  33.  
  34.      On UNICOS systems, an object is 64 bits.  On UNICOS/mk systems, an
  35.      object is 32 bits or 64 bits.  On IRIX systems, an object is 8 bits,
  36.      16 bits, 32 bits, or 64 bits.
  37.  
  38.      SSHHIIFFTT is an elemental function.  The name of this intrinsic cannot be
  39.      passed as an argument.
  40.  
  41. NNOOTTEESS
  42.      This is an outmoded routine.  Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
  43.      _M_a_n_u_a_l, _V_o_l_u_m_e _2, for information about outmoded features and their
  44.      preferred standard alternatives.
  45.  
  46.      The bit representation of the logical data type is not consistent
  47.      among UNICOS and UNICOS/mk systems.  For further details, see your
  48.      compiler's reference manuals.
  49.  
  50. RREETTUURRNN VVAALLUUEESS
  51.      SSHHIIFFTT returns a value of type Boolean on UNICOS and UNICOS/mk systems.
  52.      It returns an integer result on IRIX systems.
  53.  
  54. EEXXAAMMPPLLEESS
  55.      The following section of Fortran code shows the SSHHIIFFTT function used in
  56.      the case where _i is of type integer.  For simplicity, a 16-bit object
  57.      is used.  The bit pattern of _i and the bit pattern of the result are
  58.      also given.
  59.  
  60.           INTEGER I1, I2, I3
  61.           ...
  62.           I2 = 5
  63.           I3 = SHIFT(I1,I2)
  64.  
  65.            ---------------------------------------------------------------
  66.           | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  67.            ---------------------------------------------------------------
  68.                                            I1 (_i)
  69.  
  70.            ---------------------------------------------------------------
  71.           | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
  72.            ---------------------------------------------------------------
  73.                                           I3 (result)
  74.  
  75. SSEEEE AALLSSOO
  76.      SSHHIIFFTTLL(3I)
  77.  
  78.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  79.      man page.
  80.